package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class StringList {

    private int beginIndex;
    private int endIndex;
    private List<StringListElement> stringList;

    public StringList(List<StringListElement> stringList) {
        this.beginIndex = stringList.get(0).getBeginIndex();
        this.endIndex = stringList.get(stringList.size() - 1).getEndIndex();
        this.stringList = stringList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return stringList.size();
    }

    public StringListElement get(int index) {
        return stringList.get(index);
    }

}
